import { createSSRApp } from 'vue';
import './uni.scss';
import './static/styles/generated-vars.scss';
import { checkBtnPermission } from './utils';
import App from './App.vue';

import router, { routeInterceptor } from './router';

import 'virtual:uno.css';

import store from './store';

export function createApp() {
  const app = createSSRApp(App);

  app.use(store);
  app.use(router);
  app.use(routeInterceptor);

  app.config.globalProperties.$perms = checkBtnPermission;
  return {
    app
  };
}
